package com.jy.adscm.operation.cg.bean;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * <p>
 * 基础物料表
 * </p>
 *
 * @author zyl
 * @since 2019-08-01
 */
public class CgMaterial implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 名称
     */
    private String name;
    /**
     * 编码
     */
    private String code;
    /**
     * 型号
     */
    private String type;
    /**
     * 材质
     */
    private String texture;
    /**
     * 损耗系数
     */
    private Float no;
    /**
     * 管理等级
     */
    private String managerLevel;
    /**
     * 启用
     */
    private Integer enable;
    /**
     * 创建人
     */
    private String creator;
    @TableField(exist = false)
    private String creatorName;
    /**
     * 创建时间
     */
    private Date createTime;

    private  Integer  bid;
    @TableField(exist = false)
    private  Integer isHas;
    //提前采购日期
    @TableField(exist = false)
    private  Date  preDate;
    //单价
    @TableField(exist = false)
    private Float price;
    //供应商名
    @TableField(exist = false)
    private String suppilerNums;
    //支付方式
    @TableField(exist = false)
    private  String  payMethod;
    //供应商与物料关系
    @TableField(exist = false)
    private    CgBomSupplier cgBomSupplier;
    //供应商
    @TableField(exist = false)
    private  CgSupplier cgSupplier;
    //最晚支付
    @TableField(exist = false)
    private  Date  latePayDate;
    //工序用量
    @TableField(exist = false)
    private Float useNums;
    //计划剩余量
    private Float remaining;
    //是否需要购买(需要1不要用0)
    @TableField(exist = false)
    private Integer isNeedBuy;
    //实际采购量
    @TableField(exist = false)
    private  Float  actNums;
    @TableField(exist = false)
    private  Float  totals;

    @TableField("mType")
    private  Integer mType;

    public Integer getmType() {
        return mType;
    }

    public void setmType(Integer mType) {
        this.mType = mType;
    }

    public Float getTotals() {
        return totals;
    }

    public void setTotals(Float totals) {
        this.totals = totals;
    }

    public Float getActNums() {
        return actNums;
    }

    public void setActNums(Float actNums) {
        this.actNums = actNums;
    }

    public Integer getIsNeedBuy() {
        return isNeedBuy;
    }

    public void setIsNeedBuy(Integer isNeedBuy) {
        this.isNeedBuy = isNeedBuy;
    }

    public Float getRemaining() {
        return remaining;
    }

    public void setRemaining(Float remaining) {
        this.remaining = remaining;
    }

    public Float getUseNums() {
        return useNums;
    }

    public void setUseNums(Float useNums) {
        this.useNums = useNums;
    }

    @JsonFormat(pattern="yyyy-MM-dd ",timezone="GMT+8")
    public Date getLatePayDate() {
        return latePayDate;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd ")
    public void setLatePayDate(Date latePayDate) {
        this.latePayDate = latePayDate;
    }

    public CgSupplier getCgSupplier() {
        return cgSupplier;
    }

    public void setCgSupplier(CgSupplier cgSupplier) {
        this.cgSupplier = cgSupplier;
    }

    public CgBomSupplier getCgBomSupplier() {
        return cgBomSupplier;
    }

    public void setCgBomSupplier(CgBomSupplier cgBomSupplier) {
        this.cgBomSupplier = cgBomSupplier;
    }

    public String getPayMethod() {
        return payMethod;
    }

    public void setPayMethod(String payMethod) {
        this.payMethod = payMethod;
    }

    public String getSuppilerNums() {
        return suppilerNums;
    }

    public void setSuppilerNums(String suppilerNums) {
        this.suppilerNums = suppilerNums;
    }

    public Float getPrice() {
        return price;
    }

    public void setPrice(Float price) {
        this.price = price;
    }
    @JsonFormat(pattern="yyyy-MM-dd ",timezone="GMT+8")
    public Date getPreDate() {
        return preDate;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd ")
    public void setPreDate(Date preDate) {
        this.preDate = preDate;
    }

    public Integer getIsHas() {
        return isHas;
    }

    public void setIsHas(Integer isHas) {
        this.isHas = isHas;
    }

    public Integer getBid() {
        return bid;
    }

    public void setBid(Integer bid) {
        this.bid = bid;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTexture() {
        return texture;
    }

    public void setTexture(String texture) {
        this.texture = texture;
    }

    public Float getNo() {
        return no;
    }

    public void setNo(Float no) {
        this.no = no;
    }

    public String getManagerLevel() {
        return managerLevel;
    }

    public void setManagerLevel(String managerLevel) {
        this.managerLevel = managerLevel;
    }

    public Integer getEnable() {
        return enable;
    }

    public void setEnable(Integer enable) {
        this.enable = enable;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getCreateTime() {
        return createTime;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "CgMaterial{" +
        "id=" + id +
        ", name=" + name +
        ", code=" + code +
        ", type=" + type +
        ", texture=" + texture +
        ", no=" + no +
        ", managerLevel=" + managerLevel +
        ", enable=" + enable +
        ", creator=" + creator +
        ", createTime=" + createTime +
        "}";
    }


}
